<?php


class Blackbird_Form_ContentBlocks_MenuParams extends Blackbird_Form_BlockParamsForm
{
	function __construct($options = null)
	{
		parent::__construct($options);

		$model = new Blackbird_Model_ContentBlocks();
		$menuIdOptions = $model->fetchMenus();

		$this
			->addElement('select', 'menuId', array(
				'label' => 'Menú:',
				'required' => true,
				'multiOptions' => $menuIdOptions,
			))

			->addElement('checkbox', 'showPictures', array(
				'label' => 'Mostrar imágenes:',
			))

			->addElement('text', 'maxLevel', array(
				'label' => 'Nivel máximo a mostrar:',
				'maxlength' => 9,
				'required' => true,
				'validators' => array(array('StringLength', true, array('min' => 1, 'max' => 9)), 'Int'),
			))
			;

		$this->setDefaults(array(
			'showPictures' => 1,
			'maxLevel' => 0,
		));
	}
}

